function mydata() { // 1. 构造函数模式
    this.a1 = 0; // 定义2个实例私有的数据
    this.a2 = Array(5);
}

let mes = new mydata();
mes.a1 = 1;
mes.a2[0] = 3;

let mes2 = mes;
mes2.a1 = 8;

let mes3 = new mydata();

const messageHistory = new Map();

const his = [0, 1, 2, 3];

messageHistory.set('a_b', his);
messageHistory.set('b_a', his);

his[0] = 8;

a = messageHistory.get('a_b');

a[0] = 9;